#include "stdafx.h"
#include "CppUnitTest.h"

#include "MxPluginManager\MxPluginManager1.h"
#include "PublicInterfaces\{FAFD3CB8-FCF3-46EE-B32E-45A4FF68073E}\IImageComputePluginLib.h"
#include "PublicInterfaces\{FAFD3CB8-FCF3-46EE-B32E-45A4FF68073E}\IImageCompute.h"
#include "PublicInterfaces\{FAFD3CB8-FCF3-46EE-B32E-45A4FF68073E}\IImageComputeFnDef.h"
#include "PublicInterfaces\{FAFD3CB8-FCF3-46EE-B32E-45A4FF68073E}\IImageComputeFn.h"

#include "ImageFileUtil.h"

#include "..\..\PublicInterfaces\PluginICPopenCV\OCV-Dev-ProductID.h"

using namespace Microsoft::VisualStudio::CppUnitTestFramework;


namespace PluginICPopenCVTest
{

	TEST_CLASS(MakeEllipsePtsTest)
	{
	private:
		MxPluginManager			*_pluginMngr;
		MxPluginLib				*_plugin;
		IImageComputePluginLib	*_lib;
		IImageCompute		    *_icp;
		IImageComputeFnDef		*_fnDef;
		IImageComputeFn			*_fn;

	public:

		TEST_METHOD_INITIALIZE(MakeEllipsePtsInit)
		{
			_pluginMngr = new MxPluginManager();
			if (_pluginMngr->RefreshPluginsInRootFolder(SID_ImageProc, true) == true)
			{
				if ((_plugin = _pluginMngr->GetPlugin(PRODID_PluginICPopenCV)) != nullptr)
				{
					if ((_lib = static_cast<IImageComputePluginLib *>(_plugin->CreateClassInstance(IImageComputePluginLibIID::Guid()))) != nullptr)
					{
						if ((_icp = _lib->GetIImageCompute()) != nullptr)
						{
							GUID fnID = MxGUID::ConvertFromString("{6A022824-68BC-44B1-A0D5-D2411827DC80}");
							_fnDef = _icp->GetIImageComputeFnDef(fnID);
							_fn = _icp->GetIImageComputeFn(fnID);
						}
					}
				}
			}
		}

		TEST_METHOD_CLEANUP(MakeEllipsePtsDeinit)
		{
			if (_fn != nullptr)
				_fn->DestroyPtr();
			_fn = nullptr;

			if (_fnDef != nullptr)
				_fnDef->DestroyPtr();
			_fnDef = nullptr;

			if (_icp != nullptr)
				_icp->DestroyPtr();
			_icp = nullptr;

			if (_lib != nullptr)
				_lib->DestroyPtr();
			_lib = nullptr;

			if (_pluginMngr != nullptr)
				delete _pluginMngr;
			_pluginMngr = nullptr;
		}
		
		TEST_METHOD(MakeEllipsePtsCreateTest)
		{
			Assert::IsNotNull(_fnDef);
			Assert::IsTrue(_fnDef->IsValid());

			Assert::IsNotNull(_fn);
			Assert::IsTrue(_fn->IsValid());
		}

		TEST_METHOD(MakeEllipsePtsFnDefParamsTest)
		{
			Assert::IsNotNull(_fnDef);
			Assert::IsTrue(_fnDef->IsValid());

			Assert::AreEqual("MakeEllipsePts", _fnDef->GetLabel());
			Assert::AreEqual("Create an array of image coordinate points for ellipse from major and minor axis pts", _fnDef->GetDescription());
			Assert::AreEqual("Common", _fnDef->GetToolboxClass());
			Assert::AreEqual("MakEllipse", _fnDef->GetToolboxLabel());
			Assert::AreEqual(4, _fnDef->GetToolboxIconClassOffset());

			Assert::AreEqual(5, _fnDef->GetParamCount(IImageComputeFnDef::Direction::Input));
			Assert::AreEqual(1, _fnDef->GetParamCount(IImageComputeFnDef::Direction::Output));
			Assert::AreEqual(2, _fnDef->GetParamCount(IImageComputeFnDef::Direction::IO));

			Assert::AreEqual("StopProc", _fnDef->GetParamName(IImageComputeFnDef::Direction::IO, 0));
			Assert::AreEqual("ImageRef", _fnDef->GetParamName(IImageComputeFnDef::Direction::IO, 1));

			Assert::AreEqual("RootFolder", _fnDef->GetParamName(IImageComputeFnDef::Direction::Input, 0));
			Assert::AreEqual("IJC", _fnDef->GetParamName(IImageComputeFnDef::Direction::Input, 1));
			Assert::AreEqual("IJF", _fnDef->GetParamName(IImageComputeFnDef::Direction::Input, 2));
			Assert::AreEqual("MajorMinorAxis", _fnDef->GetParamName(IImageComputeFnDef::Direction::Input, 3));
			Assert::AreEqual("Delta", _fnDef->GetParamName(IImageComputeFnDef::Direction::Input, 4));
			Assert::AreEqual("BoundaryPts", _fnDef->GetParamName(IImageComputeFnDef::Direction::Output, 0));

			Assert::IsTrue(IImageComputeFnDef::Direction::IO == _fnDef->GetParamDirection("StopProc"));
			Assert::IsTrue(IImageComputeFnDef::Direction::IO == _fnDef->GetParamDirection("ImageRef"));
			Assert::IsTrue(IImageComputeFnDef::Direction::Input == _fnDef->GetParamDirection("RootFolder"));
			Assert::IsTrue(IImageComputeFnDef::Direction::Input == _fnDef->GetParamDirection("IJC"));
			Assert::IsTrue(IImageComputeFnDef::Direction::Input == _fnDef->GetParamDirection("IJF"));
			Assert::IsTrue(IImageComputeFnDef::Direction::Input == _fnDef->GetParamDirection("MajorMinorAxis"));
			Assert::IsTrue(IImageComputeFnDef::Direction::Input == _fnDef->GetParamDirection("Delta"));
			Assert::IsTrue(IImageComputeFnDef::Direction::Output == _fnDef->GetParamDirection("BoundaryPts"));

			Assert::IsTrue(_fnDef->ConvertStrToParamType(_fnDef->GetParamValType("StopProc")) == IImageComputeFnDef::ParamType::Bool);
			Assert::IsTrue(_fnDef->ConvertStrToParamType(_fnDef->GetParamValType("RootFolder")) == IImageComputeFnDef::ParamType::String);
			Assert::IsTrue(_fnDef->ConvertStrToParamType(_fnDef->GetParamValType("IJC")) == IImageComputeFnDef::ParamType::String);
			Assert::IsTrue(_fnDef->ConvertStrToParamType(_fnDef->GetParamValType("IJF")) == IImageComputeFnDef::ParamType::String);
			Assert::IsTrue(_fnDef->ConvertStrToParamType(_fnDef->GetParamValType("ImageRef")) == IImageComputeFnDef::ParamType::String);
			Assert::IsTrue(_fnDef->ConvertStrToParamType(_fnDef->GetParamValType("MajorMinorAxis")) == IImageComputeFnDef::ParamType::String);
			Assert::IsTrue(_fnDef->ConvertStrToParamType(_fnDef->GetParamValType("Delta")) == IImageComputeFnDef::ParamType::Integer);
			Assert::IsTrue(_fnDef->ConvertStrToParamType(_fnDef->GetParamValType("BoundaryPts")) == IImageComputeFnDef::ParamType::String);

			Assert::AreEqual(_fnDef->ConvertParamTypeToStr(IImageComputeFnDef::ParamType::Integer), _fnDef->GetParamValType("Delta"));

			Assert::IsFalse(_fnDef->IsParamValMinSet("RootFolder"));
			Assert::IsFalse(_fnDef->IsParamValMaxSet("RootFolder"));
			Assert::IsFalse(_fnDef->IsParamValMinSet("IJC"));
			Assert::IsFalse(_fnDef->IsParamValMaxSet("IJC"));
			Assert::IsFalse(_fnDef->IsParamValMinSet("IJF"));
			Assert::IsFalse(_fnDef->IsParamValMaxSet("IJF"));
			Assert::IsFalse(_fnDef->IsParamValMinSet("ImageRef"));
			Assert::IsFalse(_fnDef->IsParamValMaxSet("ImageRef"));

			Assert::IsFalse(_fnDef->IsParamValMinSet("MajorMinorAxis"));
			Assert::IsFalse(_fnDef->IsParamValMaxSet("MajorMinorAxis"));
			Assert::IsTrue(_fnDef->IsParamValMinSet("Delta"));
			Assert::IsFalse(_fnDef->IsParamValMaxSet("Delta"));
			Assert::IsFalse(_fnDef->IsParamValMaxSet("BoundaryPts"));
			Assert::IsFalse(_fnDef->IsParamValMinSet("BoundaryPts"));
			Assert::AreEqual(5, _fnDef->GetParamValMin("Delta"));

			Assert::AreEqual("no", _fnDef->GetParamDefaultVal("StopProc"));
			Assert::AreEqual("-", _fnDef->GetParamDefaultVal("RootFolder"));
			Assert::AreEqual("-", _fnDef->GetParamDefaultVal("IJC"));
			Assert::AreEqual("-", _fnDef->GetParamDefaultVal("IJF"));
			Assert::AreEqual("-", _fnDef->GetParamDefaultVal("ImageRef"));
			Assert::AreEqual("ArrayInts:0;", _fnDef->GetParamDefaultVal("MajorMinorAxis"));
			Assert::AreEqual("24", _fnDef->GetParamDefaultVal("Delta"));
			Assert::AreEqual("ArrayInts:0;", _fnDef->GetParamDefaultVal("BoundaryPts"));

			Assert::AreEqual("Stop", _fnDef->GetParamLabel("StopProc"));
			Assert::AreEqual("Root folder", _fnDef->GetParamLabel("RootFolder"));
			Assert::AreEqual("IJC id", _fnDef->GetParamLabel("IJC"));
			Assert::AreEqual("IJF id", _fnDef->GetParamLabel("IJF"));
			Assert::AreEqual("ImageRef", _fnDef->GetParamLabel("ImageRef"));
			Assert::AreEqual("MajorMinorAxisPts", _fnDef->GetParamLabel("MajorMinorAxis"));
			Assert::AreEqual("Delta", _fnDef->GetParamLabel("Delta"));
			Assert::AreEqual("Result Pts", _fnDef->GetParamLabel("BoundaryPts"));

			Assert::AreEqual("Do not process this step or any further steps", _fnDef->GetParamDesc("StopProc"));
			Assert::AreEqual("folder for project root", _fnDef->GetParamDesc("RootFolder"));
			Assert::AreEqual("GUID for job collection", _fnDef->GetParamDesc("IJC"));
			Assert::AreEqual("GUID for job file", _fnDef->GetParamDesc("IJF"));
			Assert::AreEqual("name of input image in ImageFolder without filetype", _fnDef->GetParamDesc("ImageRef"));
			Assert::AreEqual("image coordinates of pixel points in ellipse major and minor axis as ArrayInts:MajB.x,MajB.y;Majb.x,Majb.y;MinB.x,MinB.y;Minb.x,Minb.y; (if minor axis missing, duplicate major)", _fnDef->GetParamDesc("MajorMinorAxis"));
			Assert::AreEqual("degrees between points created on ellipse boundary (min 5)", _fnDef->GetParamDesc("Delta"));
			Assert::AreEqual("image coordinates of pixel points in ellipse boundary as ArrayInts:1.x,1.y;2.x,2.y;n.x,n.y;n.x,n.y;", _fnDef->GetParamDesc("BoundaryPts"));
		}


		TEST_METHOD(MakeEllipsePtsRunHorzontalTest)
		{
			Assert::IsNotNull(_fn);
			Assert::IsTrue(_fn->IsValid());

			Assert::IsTrue(_fn->InitCall(0, ".jpg", true, true));

			Assert::IsTrue(_fn->SetParamBool("StopProc", false));
			Assert::IsTrue(_fn->SetParamStr("RootFolder", "..\\..\\..\\TestImages"));
			Assert::IsTrue(_fn->SetParamStr("IJC", "IJC"));
			Assert::IsTrue(_fn->SetParamStr("IJF", "IJF"));
			Assert::IsTrue(_fn->SetParamStr("ImageRef", "MakeEllipsePtsRunHorzontal"));

			Assert::IsTrue(_fn->SetParamStr("MajorMinorAxis", "ArrayInts:100;200;200;200;150;225;150;175;"));	//image coordinates, not cartisian
			Assert::IsTrue(_fn->SetParamInt("Delta", 24));

			Assert::IsTrue(_fn->ValidateCall());
			Assert::IsTrue(_fn->DoCall());
																							//image coordinates, not cartisian
			Assert::AreEqual("ArrayInts:200;200;196;210;183;219;165;224;145;225;125;222;110;215;101;205;101;195;110;185;125;178;145;175;165;176;183;181;196;190;200;200;", _fn->GetParamStr("BoundaryPts"));
			Assert::AreEqual(32, _fn->ArrayIntsGetSize(_fn->GetParamStr("BoundaryPts")));

			Assert::IsTrue(ImageFileUtil::WriteArrayToFile(_fn, 300, 300, "..\\..\\..\\TestImages\\MakeEllipsePtsRunHorzontal.jpg", _fn->GetParamStr("BoundaryPts")));
		}

		TEST_METHOD(MakeEllipsePtsRunInvHorzontalTest)
		{
			Assert::IsNotNull(_fn);
			Assert::IsTrue(_fn->IsValid());

			Assert::IsTrue(_fn->InitCall(0, ".jpg", true, true));

			Assert::IsTrue(_fn->SetParamBool("StopProc", false));
			Assert::IsTrue(_fn->SetParamStr("RootFolder", "..\\..\\..\\TestImages"));
			Assert::IsTrue(_fn->SetParamStr("IJC", "IJC"));
			Assert::IsTrue(_fn->SetParamStr("IJF", "IJF"));
			Assert::IsTrue(_fn->SetParamStr("ImageRef", "MakeEllipsePtsRunInvHorzontal"));

			Assert::IsTrue(_fn->SetParamStr("MajorMinorAxis", "ArrayInts:200;200;100;200;150;175;150;225;"));  //image coordinates, not cartisian
			Assert::IsTrue(_fn->SetParamInt("Delta", 24));

			Assert::IsTrue(_fn->ValidateCall());
			Assert::IsTrue(_fn->DoCall());
																						  //image coordinates, not cartisian
			Assert::AreEqual("ArrayInts:200;200;196;210;183;219;165;224;145;225;125;222;110;215;101;205;101;195;110;185;125;178;145;175;165;176;183;181;196;190;200;200;", _fn->GetParamStr("BoundaryPts"));
			Assert::AreEqual(32, _fn->ArrayIntsGetSize(_fn->GetParamStr("BoundaryPts")));

			Assert::IsTrue(ImageFileUtil::WriteArrayToFile(_fn, 300, 300, "..\\..\\..\\TestImages\\MakeEllipsePtsRunInvHorzontal.jpg", _fn->GetParamStr("BoundaryPts")));
		}

		TEST_METHOD(MakeEllipsePtsRunVerticalTest)
		{
			Assert::IsNotNull(_fn);
			Assert::IsTrue(_fn->IsValid());

			Assert::IsTrue(_fn->InitCall(0, ".jpg", true, true));

			Assert::IsTrue(_fn->SetParamBool("StopProc", false));
			Assert::IsTrue(_fn->SetParamStr("RootFolder", "..\\..\\..\\TestImages"));
			Assert::IsTrue(_fn->SetParamStr("IJC", "IJC"));
			Assert::IsTrue(_fn->SetParamStr("IJF", "IJF"));
			Assert::IsTrue(_fn->SetParamStr("ImageRef", "MakeEllipsePtsRunVertical"));

			Assert::IsTrue(_fn->SetParamStr("MajorMinorAxis", "ArrayInts:150;250;150;150;125;200;175;200;"));  //image coordinates, not cartisian
			Assert::IsTrue(_fn->SetParamInt("Delta", 24));

			Assert::IsTrue(_fn->ValidateCall());
			Assert::IsTrue(_fn->DoCall());
																							//image coordinates, not cartisian
			Assert::AreEqual("ArrayInts:150;250;140;246;131;233;126;215;125;195;128;175;135;160;145;151;155;151;165;160;172;175;175;195;174;215;169;233;160;246;150;250;", _fn->GetParamStr("BoundaryPts"));
			Assert::AreEqual(32, _fn->ArrayIntsGetSize(_fn->GetParamStr("BoundaryPts")));

			Assert::IsTrue(ImageFileUtil::WriteArrayToFile(_fn, 300, 300, "..\\..\\..\\TestImages\\MakeEllipsePtsRunVertical.jpg", _fn->GetParamStr("BoundaryPts")));
		}

		TEST_METHOD(MakeEllipsePtsRunInvVerticalTest)
		{
			Assert::IsNotNull(_fn);
			Assert::IsTrue(_fn->IsValid());

			Assert::IsTrue(_fn->InitCall(0, ".jpg", true, true));

			Assert::IsTrue(_fn->SetParamBool("StopProc", false));
			Assert::IsTrue(_fn->SetParamStr("RootFolder", "..\\..\\..\\TestImages"));
			Assert::IsTrue(_fn->SetParamStr("IJC", "IJC"));
			Assert::IsTrue(_fn->SetParamStr("IJF", "IJF"));
			Assert::IsTrue(_fn->SetParamStr("ImageRef", "MakeEllipsePtsRunInvVertical"));

			Assert::IsTrue(_fn->SetParamStr("MajorMinorAxis", "ArrayInts:150;150;150;250;175;200;125;200;"));		//image coordinates, not cartisian
			Assert::IsTrue(_fn->SetParamInt("Delta", 24));

			Assert::IsTrue(_fn->ValidateCall());
			Assert::IsTrue(_fn->DoCall());
																								//image coordinates, not cartisian
			Assert::AreEqual("ArrayInts:150;250;140;246;131;233;126;215;125;195;128;175;135;160;145;151;155;151;165;160;172;175;175;195;174;215;169;233;160;246;150;250;", _fn->GetParamStr("BoundaryPts"));
			Assert::AreEqual(32, _fn->ArrayIntsGetSize(_fn->GetParamStr("BoundaryPts")));

			Assert::IsTrue(ImageFileUtil::WriteArrayToFile(_fn, 300, 300, "..\\..\\..\\TestImages\\MakeEllipsePtsRunInvVertical.jpg", _fn->GetParamStr("BoundaryPts")));
		}

		TEST_METHOD(MakeEllipsePtsRunInclinedTest)
		{
			Assert::IsNotNull(_fn);
			Assert::IsTrue(_fn->IsValid());

			Assert::IsTrue(_fn->InitCall(0, ".jpg", true, true));

			Assert::IsTrue(_fn->SetParamBool("StopProc", false));
			Assert::IsTrue(_fn->SetParamStr("RootFolder", "..\\..\\..\\TestImages"));
			Assert::IsTrue(_fn->SetParamStr("IJC", "IJC"));
			Assert::IsTrue(_fn->SetParamStr("IJF", "IJF"));
			Assert::IsTrue(_fn->SetParamStr("ImageRef", "MakeEllipsePtsRunInclined"));

			Assert::IsTrue(_fn->SetParamStr("MajorMinorAxis", "ArrayInts:100;250;200;150;180;250;125;170;"));		//image coordinates, not cartisian
			Assert::IsTrue(_fn->SetParamInt("Delta", 24));

			Assert::IsTrue(_fn->ValidateCall());
			Assert::IsTrue(_fn->DoCall());
																								//image coordinates, not cartisian
			Assert::AreEqual("ArrayInts:101;249;91;231;92;208;102;183;121;161;145;146;170;140;191;145;205;159;210;180;204;205;189;229;167;248;142;258;119;259;101;249;", _fn->GetParamStr("BoundaryPts"));
			Assert::AreEqual(32, _fn->ArrayIntsGetSize(_fn->GetParamStr("BoundaryPts")));

			Assert::IsTrue(ImageFileUtil::WriteArrayToFile(_fn, 300, 300, "..\\..\\..\\TestImages\\MakeEllipsePtsRunInclined.jpg", _fn->GetParamStr("BoundaryPts")));
		}

		TEST_METHOD(MakeEllipsePtsRunInvInclinedTest)
		{
			Assert::IsNotNull(_fn);
			Assert::IsTrue(_fn->IsValid());

			Assert::IsTrue(_fn->InitCall(0, ".jpg", true, true));

			Assert::IsTrue(_fn->SetParamBool("StopProc", false));
			Assert::IsTrue(_fn->SetParamStr("RootFolder", "..\\..\\..\\TestImages"));
			Assert::IsTrue(_fn->SetParamStr("IJC", "IJC"));
			Assert::IsTrue(_fn->SetParamStr("IJF", "IJF"));
			Assert::IsTrue(_fn->SetParamStr("ImageRef", "MakeEllipsePtsRunInvInclined"));

			Assert::IsTrue(_fn->SetParamStr("MajorMinorAxis", "ArrayInts:200;150;100;250;125;170;180;250;"));			//image coordinates, not cartisian
			Assert::IsTrue(_fn->SetParamInt("Delta", 24));

			Assert::IsTrue(_fn->ValidateCall());
			Assert::IsTrue(_fn->DoCall());
																									//image coordinates, not cartisian
			Assert::AreEqual("ArrayInts:101;249;91;231;92;208;102;183;121;161;145;146;170;140;191;145;205;159;210;180;204;205;189;229;167;248;142;258;119;259;101;249;", _fn->GetParamStr("BoundaryPts"));
			Assert::AreEqual(32, _fn->ArrayIntsGetSize(_fn->GetParamStr("BoundaryPts")));

			Assert::IsTrue(ImageFileUtil::WriteArrayToFile(_fn, 300, 300, "..\\..\\..\\TestImages\\MakeEllipsePtsRunInvInclined.jpg", _fn->GetParamStr("BoundaryPts")));
		}

		TEST_METHOD(MakeEllipsePtsRunRevInclinedTest)
		{
			Assert::IsNotNull(_fn);
			Assert::IsTrue(_fn->IsValid());

			Assert::IsTrue(_fn->InitCall(0, ".jpg", true, true));

			Assert::IsTrue(_fn->SetParamBool("StopProc", false));
			Assert::IsTrue(_fn->SetParamStr("RootFolder", "..\\..\\..\\TestImages"));
			Assert::IsTrue(_fn->SetParamStr("IJC", "IJC"));
			Assert::IsTrue(_fn->SetParamStr("IJF", "IJF"));
			Assert::IsTrue(_fn->SetParamStr("ImageRef", "MakeEllipsePtsRunRevInclined"));

			Assert::IsTrue(_fn->SetParamStr("MajorMinorAxis", "ArrayInts:200;250;100;150;125;250;180;150;"));			//image coordinates, not cartisian
			Assert::IsTrue(_fn->SetParamInt("Delta", 24));

			Assert::IsTrue(_fn->ValidateCall());
			Assert::IsTrue(_fn->DoCall());
																									//image coordinates, not cartisian
			Assert::AreEqual("ArrayInts:200;249;180;261;154;263;128;254;105;236;91;211;86;185;93;161;109;144;133;137;159;140;184;154;203;176;213;202;212;228;200;249;", _fn->GetParamStr("BoundaryPts"));
			Assert::AreEqual(32, _fn->ArrayIntsGetSize(_fn->GetParamStr("BoundaryPts")));

			Assert::IsTrue(ImageFileUtil::WriteArrayToFile(_fn, 300, 300, "..\\..\\..\\TestImages\\MakeEllipsePtsRunRevInclined.jpg", _fn->GetParamStr("BoundaryPts")));
		}

		TEST_METHOD(MakeEllipsePtsRunInvRevInclinedTest)
		{
			Assert::IsNotNull(_fn);
			Assert::IsTrue(_fn->IsValid());

			Assert::IsTrue(_fn->InitCall(0, ".jpg", true, true));

			Assert::IsTrue(_fn->SetParamBool("StopProc", false));
			Assert::IsTrue(_fn->SetParamStr("RootFolder", "..\\..\\..\\TestImages"));
			Assert::IsTrue(_fn->SetParamStr("IJC", "IJC"));
			Assert::IsTrue(_fn->SetParamStr("IJF", "IJF"));
			Assert::IsTrue(_fn->SetParamStr("ImageRef", "MakeEllipsePtsRunInvRevInclined"));

			Assert::IsTrue(_fn->SetParamBool("StopProc", false));
			Assert::IsTrue(_fn->SetParamStr("MajorMinorAxis", "ArrayInts:100;150;200;250;180;150;125;250;"));			//image coordinates, not cartisian
			Assert::IsTrue(_fn->SetParamInt("Delta", 24));

			Assert::IsTrue(_fn->ValidateCall());
			Assert::IsTrue(_fn->DoCall());
																									//image coordinates, not cartisian
			Assert::AreEqual("ArrayInts:200;249;180;261;154;263;128;254;105;236;91;211;86;185;93;161;109;144;133;137;159;140;184;154;203;176;213;202;212;228;200;249;", _fn->GetParamStr("BoundaryPts"));
			Assert::AreEqual(32, _fn->ArrayIntsGetSize(_fn->GetParamStr("BoundaryPts")));

			Assert::IsTrue(ImageFileUtil::WriteArrayToFile(_fn, 300, 300, "..\\..\\..\\TestImages\\MakeEllipsePtsRunInvRevInclined.jpg", _fn->GetParamStr("BoundaryPts")));
		}
	};


}